/**
 * 操作订单的一些公共操作
 */
define([ 'common/js/service/boss-common-service-0.1' ], function() {

	serviceModule.factory("OssCommonService", function($window, $http, $q,
			CommonRestService) {
		return {
			/**
			 * 查询优惠码
			 */
			findDiscountCode:function(requestParams){
				return CommonRestService.query("/common/oss/findDiscountCode",requestParams,false);
			},
			
			/**
			 * 根据票档ID查询对应的票品优惠
			 */
			findPriceDiscount:function(requestParams){
				return CommonRestService.query("/common/oss/findPriceDiscount",requestParams,false);
			},
			/**
			 * 根据场次ID和优惠后的金额查询适当的订单优惠列表
			 */
			findOrderDiscount:function(requestParams){
				return CommonRestService.query("/common/oss/findOrderDiscount",requestParams,false);
			},
			
			/**
			 * 根据商品ID或者座位ID查询商品的销售信息
			 */
			findGoodSaleResult:function(requestParams){
				return CommonRestService.query("/common/oss/findGoodSaleResult",requestParams);
			},
			
			/***
			 * 查询销售渠道{goodSaleChannel,goodSaleChannelName}
			 */
			getSaleChannel : function(requestParams) {
				return CommonRestService.query("/common/oss/getSaleChannel",
						requestParams);
			},

			/***
			 * 查询子渠道{key,value}
			 */
			getChildChannel : function(requestParams) {
				return CommonRestService.query("/common/oss/getChildChannel",
						requestParams);
			},

			/***
			 * 查询优惠条件信息
			 */
			getDiscountConditionOpt : function() {
				return CommonRestService.query(
						'/common/oss/getDiscountConditionOpt', {});
			},

			/***
			 * 查询享受优惠信息
			 */
			getDiscountEnjoyOpt : function() {
				return CommonRestService.query(
						'/common/oss/getDiscountEnjoyOpt', {});
			},

			/***
			 * 查询优惠对象信息
			 */
			getDiscountObjectsOpt : function() {
				return CommonRestService.query(
						'/common/oss/getDiscountObjectsOpt', {});
			},

			/***
			 * 查询优惠控制信息
			 */
			getDiscountControlOpt : function() {
				return CommonRestService.query(
						'/common/oss/getDiscountControlOpt', {});
			},

			/***
			 *查询渠道多选信息
			 */
			getSaleChannleSelects : function() {
				return CommonRestService.query(
						'/common/oss/getSaleChannleSelects', {});
			},

			/***
			 * 查询会员级别
			 */
			findCustomerLevels : function(queryParam) {
				return CommonRestService.query(
						"/common/oss/findCustomerLevels", queryParam);
			},

			/**
			 * 会员类型
			 */
			findCustomerTypes : function(queryParam) {
				return CommonRestService.query(
						"/common/oss/findCustomerLevels", queryParam);
			},

			/***
			 * 查询会员信息
			 */
			findCustomerSelect : function(queryParam) {
				return CommonRestService.query(
						"/common/oss/findCustomerSelect", queryParam);

			},

			/***
			 * 获取赠送积分类型
			 */
			getPresentation : function(queryParam) {
				return CommonRestService.query("/common/oss/getPresentation",
						queryParam);
			},
			/***
			 * 获取锁票信息
			 */
			findGoodLockInfoByEventId : function(queryParam) {
				return CommonRestService.query("/common/oss/findGoodLockInfoByEventId",
						queryParam);
			},
			
			/**
			   * 支付收款查询会员信息
			   * @param params
			   * @returns {*}
			   */
			findOrderCustomerById:function(params){
				return CommonRestService.query('/common/oss/findOrderCustomerById',params)
			},
			/**
			 * 查询操作人锁票级别
			 * @param params
			 * @returns {*}
			 */
			getCurrentUserLockLevel:function(params){
				return CommonRestService.query('/common/oss/getCurrentUserLockLevel',params)
			},
			
			/**
			 * 查询操作员是否有销售保留票的权限
			 * @param params
			 * @returns {*}
			 */
			getCuUserRevTicketAuthority:function(params){
				return CommonRestService.query('/common/oss/getCuUserRevTicketAuthority',params)
			},
			/**
			 * 查询优惠码名称
			 */
			findDiscountCodeNames:function(params){
				return CommonRestService.query('/common/oss/findDiscountCodeNames',params)
			},
			
			/**
			 * 查询公益票的相关信息
			 */
			findPublicInterestGoodList:function(params){
				return CommonRestService.query('/common/oss/findPublicInterestGoodList',params,false)
			},
			
			/**
			 * 检查公益票身份证是否绑定过
			 */
			checkPublicInterestCard:function(params){
				return CommonRestService.query('/common/oss/checkPublicInterestCard',params,false)
			}
		};
	});
});